-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validators for JSON and Graphql Exporter #1833
Conversation
e6743cc
to
3ae6b3d
Compare
3ae6b3d
to
729652b
Compare
|
||
private static final Validator INSTANCE = new NoRelationshipsProjectionValidator(); | ||
|
||
public static Validator getInstance() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not use singletons.
} | ||
|
||
@Test | ||
public void testProcessMultipleQuery() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this test different than the one above it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one has 2 queries with single projection and other one has single query with more than one projection
@@ -41,7 +41,8 @@ | |||
|
|||
public GraphQLTableExportOperation(TableExportFormatter formatter, AsyncExecutorService service, | |||
AsyncAPI export, RequestScope scope, ResultStorageEngine engine) { | |||
super(formatter, service, export, scope, engine); | |||
super(formatter, service, export, scope, engine, | |||
Arrays.asList(NoRelationshipsProjectionValidator.getInstance())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like both need the same validators. Should we move the NoRelationshipsProjectionValdator to the super class list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Single SingleRootProjectionValidator
is must as I am taking first one from collection in call method, so kept it in superclass. NoRelationshipsProjectionValdator
could be optional for any new subclass.
729652b
to
c503c06
Compare
Validators for JSON and Graphql Exporter
License
I confirm that this contribution is made under an Apache 2.0 license and that I have the authority necessary to make this contribution on behalf of its copyright owner.